home *** CD-ROM | disk | FTP | other *** search
/ Stone Design / Stone Design.iso / Stone_Friends / Wave / WavesWorld / Source / Libraries / tcl7.4b3 / doc / seek.n < prev    next >
Encoding:
Text File  |  1994-12-17  |  1.6 KB  |  52 lines

  1. '\"
  2. '\" Copyright (c) 1993 The Regents of the University of California.
  3. '\" Copyright (c) 1994 Sun Microsystems, Inc.
  4. '\"
  5. '\" See the file "license.terms" for information on usage and redistribution
  6. '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
  7. '\" 
  8. '\" @(#) seek.n 1.2 94/12/17 16:18:46
  9. '\" 
  10. .so man.macros
  11. .HS seek tcl
  12. .BS
  13. '\" Note:  do not modify the .SH NAME line immediately below!
  14. .SH NAME
  15. seek \- Change the access position for an open file
  16. .SH SYNOPSIS
  17. \fBseek \fIfileId offset \fR?\fIorigin\fR?
  18. .BE
  19.  
  20. .SH DESCRIPTION
  21. .PP
  22. Change the current access position for \fIfileId\fR.
  23. \fIFileId\fR must have been the return
  24. value from a previous call to \fBopen\fR, or it may be \fBstdin\fR,
  25. \fBstdout\fR, or \fBstderr\fR to refer to one of the standard I/O
  26. channels.
  27. The \fIoffset\fR and \fIorigin\fR arguments specify the position at
  28. which the next read or write will occur for \fIfileId\fR.
  29. \fIOffset\fR must be an integer (which may be negative) and \fIorigin\fR
  30. must be one of the following:
  31. .TP
  32. \fBstart\fR
  33. The new access position will be \fIoffset\fR bytes from the start
  34. of the file.
  35. .TP
  36. \fBcurrent\fR
  37. The new access position will be \fIoffset\fR bytes from the current
  38. access position; a negative \fIoffset\fR moves the access position
  39. backwards in the file.
  40. .TP
  41. \fBend\fR
  42. The new access position will be \fIoffset\fR bytes from the end of
  43. the file.  A negative \fIoffset\fR places the access position before
  44. the end-of-file, and a positive \fIoffset\fR places the access position
  45. after the end-of-file.
  46. .LP
  47. The \fIorigin\fR argument defaults to \fBstart\fR.
  48. This command returns an empty string.
  49.  
  50. .SH KEYWORDS
  51. access position, file, seek
  52.